package com.zh.work.entity.merch;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zh.common.entity.ImageEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Document("merch_info")
@ApiModel("商户实体类信息")
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("merch_info")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class MerchInfoEntity extends ImageEntity {
    private static final long serialVersionUID = 5879522132888685970L;

    @ApiModelProperty(value = "主键", name = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "商户编号", name = "merchNo")
    @TableField(value = "merchno")
    private String merchNo;
    @ApiModelProperty(value = "商户简称", name = "merchName")
    private String merchName;
    @ApiModelProperty(value = "商户全称", name = "fullName")
    private String fullName;
    @ApiModelProperty(value = "商户类别(1-MPOS，2-传统POS，4-二维码，8-网关，16-快捷)", name = "merchType")
    private Integer merchType;
    @ApiModelProperty(value = "机构代码", name = "organNo")
    private String organNo;
    @ApiModelProperty(value = "营业执照编号", name = "bizLicense")
    private String bizLicense;
    @ApiModelProperty(value = "法人姓名", name = "legalName")
    private String legalName;
    @ApiModelProperty(value = "法人身份证号", name = "identityCard")
    private String identityCard;
    @ApiModelProperty(value = "联系人", name = "linkMan")
    private String linkMan;
    @ApiModelProperty(value = "电子邮箱", name = "email")
    private String email;
    @ApiModelProperty(value = "固定电话", name = "telephone")
    private String telephone;
    @ApiModelProperty(value = "手机号码", name = "mobile")
    private String mobile;
    @ApiModelProperty(value = "MCC码", name = "mcc")
    private String mcc;
    @ApiModelProperty(value = "所在省市区", name = "provinceCity")
    private String provinceCity;
    @ApiModelProperty(value = "详细地址", name = "address")
    private String address;
    @ApiModelProperty(value = "上级代理商编号(运营平台为1000000000)", name = "superAgent")
    private String superAgent;
    @ApiModelProperty(value = "商户状态 0-已注册 1-未开通 2-已开通", name = "status")
    private Integer status;
    @ApiModelProperty(value = "开通时间", name = "openTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date openTime;
    @ApiModelProperty(value = "审核对象(运营平台为1000000000)", name = "auditAgentNo")
    @TableField(value = "audit_agentno")
    private String auditAgentNo;
    @ApiModelProperty(value = "费率模式 1-固定费率 2-一机多费率", name = "rateMode")
    private Integer rateMode;
    @ApiModelProperty(value = "流水号", name = "seqNo")
    @TableField(exist = false)
    private String seqNo;


    /* 传统POS费率 */
    @ApiModelProperty(value = "借记卡费率", name = "debitRate")
    private Float debitRate;
    @ApiModelProperty(value = "借记卡封顶金额", name = "debitFixed")
    private Float debitFixed;
    @ApiModelProperty(value = "信用卡费率", name = "creditRate")
    private Float creditRate;
    @ApiModelProperty(value = "信用卡封顶金额", name = "creditFixed")
    private Float creditFixed;
    @ApiModelProperty(value = "T+0费率(T+0增量)", name = "t0Rate")
    private Float t0Rate;


    /* MPOS费率 */
    @ApiModelProperty(value = "app费率", name = "appRate")
    private Float appRate;
    @ApiModelProperty(value = "app封顶", name = "appFixed")
    private Float appFixed;
    @ApiModelProperty(value = "APP贷记卡费率", name = "appCredit")
    private Float appCredit;
    @ApiModelProperty(value = "APPT+0费率增量", name = "appT0Rate")
    private Float appT0Rate;


    @ApiModelProperty(value = "磁条卡单笔限额", name = "stripeCardFixed")
    private Float stripeCardFixed;
    @ApiModelProperty(value = "芯片卡单笔限额", name = "chipCardFixed")
    private Float chipCardFixed;
    @ApiModelProperty(value = "代理商费率编号", name = "agentFeeId")
    private Integer agentFeeId;
    @ApiModelProperty(value = "结算类型(多选:1-T+0结算 2-T+1结算 4-T+5结算 )", name = "settleTypeM")
    @TableField(value = "settle_type")
    private Integer settleTypeM;
    @ApiModelProperty(value = "结算账号", name = "accountNo")
    @TableField("accountno")
    private String accountNo;
    @ApiModelProperty(value = "帐户类型 1-对私 2-对公", name = "accountType")
    private Integer accountType;
    @ApiModelProperty(value = "帐户户名", name = "accountName")
    private String accountName;
    @ApiModelProperty(value = "开户行行号", name = "bankNo")
    @TableField("bankno")
    private String bankNo;
    @ApiModelProperty(value = "开户行名称", name = "bankName")
    private String bankName;
    @ApiModelProperty(value = "单笔限额(单位:元)", name = "amtLimit")
    private Float amtLimit;
    @ApiModelProperty(value = "单日限额(单位:万元)", name = "dayLimit")
    private Integer dayLimit;
    @ApiModelProperty(value = "单月限额(单位:万元)", name = "monthLimit")
    private Integer monthLimit;
    @ApiModelProperty(value = "开通功能(多选1-消费 2-退货 4-余额查询 8-预授权)", name = "transCtrl")
    private Integer transCtrl;
    @ApiModelProperty(value = "录入日期", name = "addTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String addTime;
    @ApiModelProperty(value = "一级代理商编号", name = "firstAgentNo")
    @TableField("first_agentno")
    private String firstAgentNo;
    @ApiModelProperty(value = "机构编号", name = "branchNo")
    @TableField("branchno")
    private String branchNo;
    @ApiModelProperty(value = "业务类型 1-Mpos 2-传统pos 4-二维码 8-网关 16-快捷 32-银联", name = "bizType")
    private Integer bizType;
    @ApiModelProperty(value = "传统费率", name = "tradRate")
    private Float tradRate;

    @ApiModelProperty(value = "商户级别(1-A,2-B,3-C)", name = "merchLevel")
    private Integer merchLevel;
    @ApiModelProperty(value = "客户号", name = "customerNo")
    @TableField(value = "customerno")
    private String customerNo;
    @ApiModelProperty(value = "沉默商户(Y 沉默商户,N不是)", name = "silenceMerch")
    private String silenceMerch;
    @ApiModelProperty(value = "t0封顶费率", name = "t0Fixed")
    private Float t0Fixed;

    @ApiModelProperty(value = "线上费率（网关T+1费率）", name = "manuRate")
    private Float manuRate;
    @ApiModelProperty(value = "线上封顶", name = "manuFixed")
    private Float manuFixed;
    @ApiModelProperty(value = "交易密匙", name = "merchKey")
    private String merchKey;
    @ApiModelProperty(value = "交易通知地址", name = "onlineUrlNotify")
    private String onlineUrlNotify;
    @ApiModelProperty(value = "交易跳转界面", name = "onlineUrlReturn")
    private String onlineUrlReturn;

    @ApiModelProperty(value = "网关T0费率", name = "gatewayRateT0")
    private Float gatewayRateT0;
    @ApiModelProperty(value = "分销商级别(1-BOSS 2-高级 3-中级 4-低级 5-不属于分销商)", name = "saleLevel")
    private Integer saleLevel;
    @ApiModelProperty(value = "折扣比例", name = "zkRate")
    private Integer zkRate;
    @ApiModelProperty(value = "折扣起始时间", name = "zkTimeStart")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date zkTimeStart;
    @ApiModelProperty(value = "折扣截止时间", name = "zkTimeEnd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date zkTimeEnd;
    @ApiModelProperty(value = "折扣金额", name = "zkAmount")
    private Float zkAmount;
    @ApiModelProperty(value = "初审状态 1-待审核 2-审核拒绝 3-审核通过", name = "auditStatus")
    private Integer auditStatus;
    @ApiModelProperty(value = "终审状态 1-待审核 2-审核拒绝 3-审核通过 4-总公司待审核", name = "judgStatus")
    private Integer judgStatus;
    @ApiModelProperty(value = "初审备注", name = "remark")
    private String remark;
    @ApiModelProperty(value = "终审备注", name = "judgRemark")
    private String judgRemark;
    @ApiModelProperty(value = "初审时间", name = "auditTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date auditTime;
    @ApiModelProperty(value = "终审时间", name = "judgAuditTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date judgAuditTime;
    @ApiModelProperty(value = "图片JSON", name = "imgJsonString")
    @TableField(exist = false)
    private String imgJsonString;

    // 后续增加字段
    @ApiModelProperty(value = "商户联系人类型-01-法人，02-实际控制人，03-代理人，00-其他", name = "merContactType")
    private String merContactType;
    @ApiModelProperty(value = "商户地址", name = "merchAddress")
    private String merchAddress;
    @ApiModelProperty(value = "商户业务类型：01公司、02个体工商户、03小微商户", name = "merchBizType")
    private String merchBizType;
    @ApiModelProperty(value = "营业执照有效期:(yyyyMMdd,若长期请填88888888)", name = "bizLicenseExp")
    private String bizLicenseExp;
    @ApiModelProperty(value = "营业执照经营范围", name = "bizScope")
    private String bizScope;
    @ApiModelProperty(value = "法人身份证有效期:(yyyyMMdd,若长期请填88888888)", name = "legalExp")
    private String legalExp;
    @ApiModelProperty(value = "结算账户身份证号码", name = "accountIdentityCard")
    private String accountIdentityCard;
    @ApiModelProperty(value = "结算账户绑定手机号码", name = "bankAccountMobile")
    private String bankAccountMobile;
    @ApiModelProperty(value = "结算账户身份证有效期:(yyyyMMdd,若长期请填88888888)", name = "accountIdentityExp")
    private String accountIdentityExp;
    @ApiModelProperty(value = "微信商户号wxMerchNo", name = "wxMerchNo")
    private String wxMerchNo;

    // 2020.05.9版新增字段
    @ApiModelProperty(value = "法人证件结束时间", name = "pidEndDate")
    @TableField(exist = false)
    private String pidEndDate;
    @ApiModelProperty(value = "法人证件开始时间", name = "pidBeginDate")
    @TableField(exist = false)
    private String pidBeginDate;
    @ApiModelProperty(value = "银行归属省", name = "bankProv")
    @TableField(exist = false)
    private String bankProv;
    @ApiModelProperty(value = "银行归属市", name = "bankCity")
    @TableField(exist = false)
    private String bankCity;
    @ApiModelProperty(value = "机具编号", name = "termNo")
    @TableField(exist = false)
    private String termNo;

    @ApiModelProperty(value = "基础分数", name = "score")
    private String score;

}
